Skip to content

feat: Add the FDv2 cache initializer and per-context freshness to the client - #613

Draft
beekld wants to merge 2 commits into
bklimt/SDK-3032/client-fdv2-orchestratorfrom
bklimt/SDK-3033/client-fdv2-cache-initializer
Draft

beekld wants to merge 2 commits into
bklimt/SDK-3032/client-fdv2-orchestratorfrom
bklimt/SDK-3033/client-fdv2-cache-initializer

Conversation

@beekld

@beekld beekld commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an FDv2 cache initializer so the client can begin evaluating from its local per-context cache before the network responds, and tracks how fresh each context's cached data is.

  • A cache hit produces a full basis with no selector. The cached flags are applied so evaluation can begin, but the missing selector keeps them from becoming a delta basis, so initialization continues to a network source for verified data and a real selector. A miss produces a "none" result, and the next initializer runs.
  • Cache-sourced data is marked so it is not written back to the cache it came from.
  • The client records a freshness timestamp per context, keyed by a hash of the full context, updated when a payload arrives or a "none" intent confirms the current data, and persisted alongside the cached flags.

Design note: this client persists a per-context freshness timestamp keyed by a hash of the full context, matching Android. Flutter's FDv2 freshness is different -- an in-memory, per-synchronizer timestamp that is neither persisted nor keyed by context.

Internal only. Not user-selectable yet.

@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch from e05b5ed to db55b09 Compare September 15, 2026 00:32
@beekld
beekld force-pushed the bklimt/SDK-3032/client-fdv2-orchestrator branch from ae8dc46 to 448460e Compare September 15, 2026 00:32
@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch from db55b09 to d2cdc4e Compare September 16, 2026 20:19
@beekld
beekld force-pushed the bklimt/SDK-3032/client-fdv2-orchestrator branch from 7d79b26 to c3faa16 Compare September 16, 2026 20:56
@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch 2 times, most recently from bd219dc to e78670c Compare September 16, 2026 21:25
@beekld
beekld force-pushed the bklimt/SDK-3032/client-fdv2-orchestrator branch 2 times, most recently from b53a79c to f52848a Compare September 17, 2026 00:03
@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch from e78670c to 20d58d0 Compare September 17, 2026 00:03
@beekld
beekld force-pushed the bklimt/SDK-3032/client-fdv2-orchestrator branch from f52848a to b387a57 Compare September 17, 2026 22:09
@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch from 20d58d0 to 6146cea Compare September 17, 2026 22:09
@beekld
beekld force-pushed the bklimt/SDK-3033/client-fdv2-cache-initializer branch from 6146cea to 44884f9 Compare September 17, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant